﻿using System;
using MessagePack.Formatters;

namespace MessagePack.Resolvers
{
	// Token: 0x02000126 RID: 294
	public class PrimitiveObjectResolver : IFormatterResolver
	{
		// Token: 0x0600045C RID: 1116 RVA: 0x00013818 File Offset: 0x00011C18
		private PrimitiveObjectResolver()
		{
		}

		// Token: 0x0600045D RID: 1117 RVA: 0x00013820 File Offset: 0x00011C20
		public IMessagePackFormatter<T> GetFormatter<T>()
		{
			return PrimitiveObjectResolver.FormatterCache<T>.formatter;
		}

		// Token: 0x040001EB RID: 491
		public static IFormatterResolver Instance = new PrimitiveObjectResolver();

		// Token: 0x02000127 RID: 295
		private static class FormatterCache<T>
		{
			// Token: 0x040001EC RID: 492
			public static readonly IMessagePackFormatter<T> formatter = (typeof(T) != typeof(object)) ? null : ((IMessagePackFormatter<T>)PrimitiveObjectFormatter.Instance);
		}
	}
}
